package com.app.mymusic.ui;

import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.app.mymusic.R;
import com.app.mymusic.test.dagger2.DaggerActivity;
import com.app.mymusic.ui.charts.ChartsActivity;
import com.app.mymusic.ui.greendao.GreendaoActivity;
import com.app.mymusic.ui.persons.PersonsActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2016/8/12.
 */
public class MainMenuFragment extends Fragment {
    @BindView(R.id.mianmemu_person)
    TextView mianmemuPerson;
    @BindView(R.id.mianmemu_setting)
    TextView mianmemuSetting;
    @BindView(R.id.mianmemu_skin)
    TextView mianmemuSkin;
    @BindView(R.id.mianmemu_persons)
    TextView mianmemuPersons;
    @BindView(R.id.mianmemu_charts)
    TextView mianmemuCharts;
    @BindView(R.id.mianmemu_setting1)
    TextView mianmemuSetting1;
    @BindView(R.id.mianmemu_setting2)
    TextView mianmemuSetting2;

    public MainMenuFragment() {
        super();
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_mainmenu, null);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
    }

    @Override
    public void onDetach() {
        super.onDetach();
    }

    @Override
    public void onPause() {
        super.onPause();
    }

    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void onStop() {
        super.onStop();
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @OnClick({R.id.mianmemu_person, R.id.mianmemu_setting, R.id.mianmemu_skin
    ,R.id.mianmemu_persons, R.id.mianmemu_charts, R.id.mianmemu_setting1, R.id.mianmemu_setting2})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.mianmemu_person:
                startActivity(new Intent(getActivity(), DaggerActivity.class));
                break;
            case R.id.mianmemu_setting:

                break;
            case R.id.mianmemu_skin:
                startActivity(new Intent(getActivity(), SkinSettingActivity.class));
                break;
            case R.id.mianmemu_persons:
                startActivity(new Intent(getActivity(), PersonsActivity.class));
                break;
            case R.id.mianmemu_charts:
                startActivity(new Intent(getActivity(), ChartsActivity.class));
                break;
            case R.id.mianmemu_setting1:
                break;
            case R.id.mianmemu_setting2:
                startActivity(new Intent(getActivity(), GreendaoActivity.class));
                break;
        }
    }

}
